<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>消息通知-{$tpshop_config['shop_info_store_title']}</title>
    <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
    <link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css">
    <link rel="stylesheet" href="__STATIC__/css/page.css" type="text/css">
    <script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__STATIC__/js/slider.js"></script>

</head>

<body>
<!--------头部开始-------------->
<include file="Public/header" />
<!--------头部结束-------------->

    <div class="breadcrumb-area">  
<div class="layout">  
	    <foreach name="navigate_user" key="k" item="v">
	        <if condition="$k neq '首页'"> > </if>  
            <a href="{$v}">{$k}</a> 
        </foreach>
    </div>
</div>
<div class="layout pa-to-10 fo-fa-ar">
    <!--菜单-->
    <include file="User/menu" />
    <!--菜单-->
    <div class="fr wi872">
        <div class="he50 wddd">
            <div class="fl ddd-h2">
                <h2><span>{$Think.lang.message_inform}</span></h2>
            </div>

        </div>
        <div class="wddd-li">
            <ul>
                <li class="wddd-red" id="ALL" onClick="ajax_message(0);"><a>{$Think.lang.all_message} </a></li>
                <li id="WAITPAY" onClick="ajax_message(1);"><a>{$Think.lang.sys_message} <em></em></a></li>
                <li id="WAITSEND" onClick="ajax_message(2);"><a>{$Think.lang.event_inform} <em></em></a></li>
            </ul>
        </div>
        <div class="wddd-js ov-in">
            <div class="tp_notice">

            </div>
        </div>
    </div>
</div>
<div class="he80"></div>
<!--------footer-开始-------------->
<include file="Public/footer" />
<!--------footer-结束-------------->


</body>
<script>

    $(function () {
        ajax_message(0);
        $('.wddd-li ul li').click(function() {
            $(this).addClass('wddd-red').siblings().removeClass('wddd-red');
        });
    });

    /**
     * @author dyr
     * 消息ajax请求
     * @param type
     */
    function ajax_message(type) {
        $.ajax({
            type: "post",
            url: "{:U('Home/User/ajax_message_notice')}",
            data:{type:type},
            dataType: 'html',
            success: function (data) {
                if (data) {
                    $(".tp_notice").html('');
                    $(".tp_notice").append(data);
                } else {
                    $(".tp_notice").html('<div id="tips_message"><div class="message_tipws_content"><div class="tips_img"><img src="__STATIC__/images/tips_message.png" ></div><div class="tipws_content">{$Think.lang.no_ts_2}<a href="{:U(\'Goods/goodsList\')}">{$Think.lang.buygoods}<i class="icon-chevron-right-circle"></i></a></div><div class="clear"></div></div></div>');
                }
            }
        });
    }
  
</script>
</html>